﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_delUser : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
        Server.Execute("inc/checkPurview.aspx");  // 此处用户权限验证
        db_users user = new db_users();
        string user_ID = Request.QueryString["id"];
        string user_Type = Request.QueryString["type"];
        //通过验证控件的验证
        if (user_ID != null && (user_Type.Equals("t") || user_Type.Equals("f")))
        {
            //if (user.delUser(user_ID))
            //{
            //    if (user_Type.Equals("t"))
            //    {
            //        Response.Write("<script language=javascript>alert('删除成功！');location.href='manageUser.aspx';</script>");
            //    }
            //    else
            //    {
            //        Response.Write("<script language=javascript>alert('删除成功！');location.href='reviewUser.aspx';</script>");
            //    }
            //}
            //else
            //{
            //    if (user_Type.Equals("t"))
            //    {
            //        Response.Write("<script language=javascript>alert('失败！');location.href='manageUser.aspx';</script>");
            //    }
            //    else
            //    {
            //        Response.Write("<script language=javascript>alert('失败！');location.href='reviewUser.aspx';</script>");
            //    }
            //}
        }
        else
        {
            Response.Redirect("manageUser.aspx");
        }
    }
}